The method is now a plain getter of the `key-focus` property,
so handle the case where it returns null.
See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3633>
}
_onStageKeyFocusChanged() {
- let focus = global.stage.get_key_focus();
- let appearFocused = this._entry.contains(focus) ||
- this._searchResults.contains(focus);
+ const focus = global.stage.get_key_focus();
+ const appearFocused = focus != null &&
+ (this._entry.contains(focus) ||
+ this._searchResults.contains(focus));
this._text.set_cursor_visible(appearFocused);